package com.lhkj.ct.wechat.base.model.dto;


import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
  * <p>
  *     描述：微信JS_API下单
  * </p>
  */
public class WxJsapiOrderRequest implements Serializable {

    @ApiModelProperty(value = "小程序appId")
    private String appId;

    @ApiModelProperty(value = "商户号id")
    private String mchid;

    @ApiModelProperty(value = "商品描述")
    private String description;

    @ApiModelProperty(value = "商户系统内部订单号", notes ="只能是数字、大小写字母_-*且在同一个商户号下唯一")
    private String outTradeNo;

    @ApiModelProperty(value = "附加数据", notes ="在查询API和支付通知中原样返回，可作为自定义参数使用，实际情况下只有支付完成状态才会返回该字段")
    private String attach;

    @ApiModelProperty(value = "订单失效时间"
            , notes = "格式为yyyyMMddHHmmss，如2009年12月27日9点10分10秒表示为20091227091010。其他详见时间规则"
            , example = "20091227091010"
    )
    private String timeExpire;

    @ApiModelProperty(value = "异步接收微信支付结果通知的回调地址，通知url必须为外网可访问的url，不能携带参数。"
            , notes = "通知url必须为外网可访问的url，不能携带参数。 公网域名必须为https，如果是走专线接入，使用专线NAT IP或者私有回调域名可使用http"
            , example = "https://www.weixin.qq.com/wxpay/pay.php")
    private String notifyUrl;

    @ApiModelProperty(value = "订单金额", notes = "单位为分")
    private Integer total;

    @ApiModelProperty(value = "货币类型")
    private String currency = "CNY";

    @ApiModelProperty(value = "支付者-微信openId")
    private String openid;

    @ApiModelProperty(value = "预支付id，用户未支付再次支付")
    private String prepayId;

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getMchid() {
        return mchid;
    }

    public void setMchid(String mchid) {
        this.mchid = mchid;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public String getAttach() {
        return attach;
    }

    public void setAttach(String attach) {
        this.attach = attach;
    }

    public String getTimeExpire() {
        return timeExpire;
    }

    public void setTimeExpire(String timeExpire) {
        this.timeExpire = timeExpire;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getPrepayId() {
        return prepayId;
    }

    public void setPrepayId(String prepayId) {
        this.prepayId = prepayId;
    }

    public static WxJsapiOrderRequestBuilder builder() {
        return new WxJsapiOrderRequestBuilder();
    }

    public static class WxJsapiOrderRequestBuilder {
        private final WxJsapiOrderRequest wxJsapiOrderRequest;

        public WxJsapiOrderRequestBuilder() {
            wxJsapiOrderRequest = new WxJsapiOrderRequest();
        }

        public WxJsapiOrderRequestBuilder appId(String id) {
            this.wxJsapiOrderRequest.appId = id;
            return this;
        }

        public WxJsapiOrderRequestBuilder mchid(String mchid) {
            this.wxJsapiOrderRequest.mchid = mchid;
            return this;
        }

        public WxJsapiOrderRequestBuilder description(String description) {
            this.wxJsapiOrderRequest.description = description;
            return this;
        }

        public WxJsapiOrderRequestBuilder outTradeNo(String outTradeNo) {
            this.wxJsapiOrderRequest.outTradeNo = outTradeNo;
            return this;
        }

        public WxJsapiOrderRequestBuilder attach(String attach) {
            this.wxJsapiOrderRequest.attach = attach;
            return this;
        }

        public WxJsapiOrderRequestBuilder timeExpire(String timeExpire) {
            this.wxJsapiOrderRequest.timeExpire = timeExpire;
            return this;
        }

        public WxJsapiOrderRequestBuilder notifyUrl(String notifyUrl) {
            this.wxJsapiOrderRequest.notifyUrl = notifyUrl;
            return this;
        }


        public WxJsapiOrderRequestBuilder total(Integer total) {
            this.wxJsapiOrderRequest.total = total;
            return this;
        }

        public WxJsapiOrderRequestBuilder currency(String currency) {
            this.wxJsapiOrderRequest.currency = currency;
            return this;
        }

        public WxJsapiOrderRequestBuilder openid(String openid) {
            this.wxJsapiOrderRequest.openid = openid;
            return this;
        }

        public WxJsapiOrderRequestBuilder prepayId(String prepayId) {
            this.wxJsapiOrderRequest.prepayId = prepayId;
            return this;
        }


        public WxJsapiOrderRequest build() {
            return this.wxJsapiOrderRequest;
        }
    }
}
